<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">

    <title></title>
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/vue.min.js"></script>
    <style>
        #app{
            background-color: #d0d5d8;
        }
    </style>
</head>
<body>
<div id="app">
        <hr>
        <h3>{{results.question.title}}</h3>
        <div v-for="content in results.question.content">
            <p>{{content}}</p>
        </div>
    答案：
    <div v-for="answer in results.question.answer">
        <div>{{answer}}</div>&nbsp;&nbsp;
    </div>

</div>
<script type="text/javascript">
    new Vue({
        el:"#app",
        data:{
            results:[],
            questionId:0
        },
        mounted:function () {
            let that=this
            that.questionId=$.getUrlParam("questionId")
            $.ajax({
                url:"/question/getOne/"+that.questionId,
                type:"GET",
                success:function (results) {
                    that.results=results.data
                    console.log(that.results)
                }
            })
        }
    })
</script>

</body>
</html>